﻿@page
@model _17bang.Pages.Article.NewModel
@{
    ViewData["Title"] = "文章发布.一起帮";
}
<style>
    .field-validation-error 
    {
        color: red;
        font-size: 12px;
        display: inline-block;
        font: normal normal normal 14px/1 FontAwesome;
        font-size: inherit;
        text-rendering: auto;
        -webkit-font-smoothing: antialiased;
    }
    .field-validation-error::before 
    {
            content: '\f119';
    }
</style>
<form asp-page="/Article" method="post" style="padding-top:120px">
    <div class="form-group">
        <label><b>标题：（*必填）</b></label><br />
        <input type="text" asp-for="Essay.Title" placeholder="来一个醒目的标题吧" class="form-control">
        <span asp-validation-for="Essay.Title"></span>
    </div>
    <div class="form-group">
        <label><b>内容:（*必填）</b></label><br />
        <textarea type="text" asp-for="Essay.Description" class="form-control" style="height:500px"></textarea>
        <span asp-validation-for="Essay.Description"></span>
    </div>
    <div class="form-group">
        <label><b>添加到系列：</b></label><br />
        <div class="input-group">
            <select asp-for="Essay.Default" asp-items="Model.AvailableDefault" class="custom-select" id="inputGroupSelect01">
            </select>
            <div class="input-group-append">
                <label class="input-group-text" for="inputGroupSelect01"><a href="">✚新系列</a></label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label><b>关键字：（*必填）</b></label><br />
        <input type="text" asp-for="Essay.Keyword" placeholder="用空格分隔，总长度不超过25个字符"  class="form-control">
        <span asp-validation-for="Essay.Keyword"></span>
    </div>
    <div class="form-group">
        <label><b>摘要:（*建议填写）</b></label><br />
        <textarea type="text" asp-for="Essay.Abstract" placeholder="不填写的话，系统会截取文章前255字作为摘要显示"  class="form-control" style="height:200px"></textarea>
    </div>
    <div class="form-group">
        <label><b>之前用过的广告：</b></label><br />
        <select asp-for="Essay.AD" asp-items="Model.AvailableAD" placeholder ="----使用新的广告----" class="form-control"></select>
    </div>
    <div class="alert alert-warning" style="display:block;border: 1px dashed;">
        <div class="text-right checkbox">
            <label>
                <input id="AdContent_Edit" name="AdContent.Edit" type="checkbox" value="true"><input name="AdContent.Edit" type="hidden" value="false"> 修改
            </label>
        </div>
        <div class="form-group">
            <label><b>文字内容：</b>（*必填）></label><br />
            <input asp-for="Essay.Text" type="text" placeholder="最多不超过24个字符"  class="form-control">
            <span asp-validation-for="Essay.Text"></span>
        </div>
        <div>
            <label><b>链接：（*必填）</b></label><br />
            <input type="text" placeholder="http或https开头的网址" asp-for="Essay.Link"  class="form-control" /><br />
            <span asp-validation-for="Essay.Link"></span>
        </div>
    </div>
    <div class="form-inline">
        <button type="submit" class="btn btn-primary" asp-page="/">发布为最新</button>
        <button type="button" class="btn btn-light" asp-page="/">保存基本内容</button>
    </div>
</form>
